package com.pbs.ui;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.pbs.ui.dialog.LoginDialog;

public class OnlineFeatures extends Activity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.onlines);
		MySharedPreferences msp = MySharedPreferences.instance(this);
		String username = msp.getSharedPreferences("username", null);
		String password = msp.getSharedPreferences("password", null);
		boolean online_status = msp
				.getSharedPreferences("online_status", false);
		if (username == null || password == null || online_status == false) {
			LoginDialog login_dialog = new LoginDialog(this);
			login_dialog.setCancelable(false);
			login_dialog.show();
		}
	}

	public void buttonClicked(View v) {
		MySharedPreferences msp = MySharedPreferences.instance(this);
		String username = msp.getSharedPreferences("username", null);
		String password = msp.getSharedPreferences("password", null);
		boolean online_status = msp
				.getSharedPreferences("online_status", false);
		if (username == null || password == null || online_status == false) {
			LoginDialog login_dialog = new LoginDialog(this);
			login_dialog.setCancelable(false);
			login_dialog.show();
		}
		switch (v.getId()) {
		case R.id.cmd_afriend:
			break;
		case R.id.cmd_map_tracking:
			Toast.makeText(this, "Have not function", Toast.LENGTH_LONG).show();
		case R.id.cmd_change_password:
		case R.id.cmd_commit:
		case R.id.cmd_revert:
		case R.id.cmd_delete_account:
		case R.id.cmd_import_sdcard:
		case R.id.cmd_import_simcard:
		case R.id.cmd_export_sdcard:
		case R.id.cmd_export_simcard:
		case R.id.cmd_new_account:
		case R.id.cmd_sent_contact:
		case R.id.cmd_getback_password:
		case R.id.cmd_incoming_contact:
		}
	}
}
